﻿// Entity Framework MapTileStore - http://maptilestore.codeplex.com/
// Copyright © 2012 Majid Qaraee
// Licensed under the Microsoft Public License (Ms-PL)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace MapEntity
{
    public class Tile
    {
        [Key]
        public int Id { get; set; }

        [Required]
        public int ZoomLevel { get; set; }

        [Required]
        public int X { get; set; }

        [Required]
        public int Y { get; set; }

        [Required]
        public DateTime Date { get; set; }

        [Required]
        public int ProviderId { get; set; }

        [Required]
        public int ImageTileSourceId { get; set; }

        [ForeignKey("ProviderId")]
        public virtual Provider Provider { get; set; }

        [ForeignKey("ImageTileSourceId")]
        public virtual ImageTileSource ImageTileSource { get; set; }
    }
}
